<template>
  <!--符合性审查项 标段节点下 所有专家出具 结论 明细 -->
  <a-card :bordered="false">
    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        :scroll="{ x: true }"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="false"
        :loading="loading"
        class="j-table-force-nowrap"
      >
      </a-table>
    </div>
  </a-card>
</template>

<script>
import '@/assets/less/TableExpand.less'
import { getAction, postAction } from '@api/manage'
export default {
  name: 'ExpertList',
  components: {},
  props: {
    bidSectionId: {},
    businessId: {},
  },
  data() {
    return {
      description: '评审专家',
      loading: false,
      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
        },
        {
          title: '专家',
          align: 'center',
          dataIndex: 'expertName',
        },
        {
          title: '是否组长',
          align: 'center',
          dataIndex: 'isChairMan',
          customRender: function (text) {
            return text == '是' ? '是' : '否'
          },
        },
      ],
      url: {
        queryExpertList: '/exPingbiao/exPingbiaoExpert/expertList', //专家列表
      },
      dataSource: [],
    }
  },
  watch: {
    bidSectionId: {
      immediate: true,
      handler(val) {
        if (val != null && val != undefined && val != '') {
          this.loadData(val)
        }
      },
    },
  },
  created() {},
  computed: {},
  methods: {
    loadData(bidSectionId) {
      getAction(this.url.queryExpertList, { sectionId: bidSectionId })
        .then((res) => {
          if (res.success) {
            this.dataSource = res.result
          }
        })
        .finally(() => {})
    },
  },
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
